      
 <script type="text/javascript">
<!--
  $(function(){
  	sy.admin.menu${(OP.TMenu.id)!}.save = function(obj) {
  		if($("#menu${(OP.TMenu.id)!}Form").valid()){
  			$.ajax({
				type: "POST", 
				url: "op_save_${(OP.TMenu.id)!}.action",
				data: $('#menu${(OP.TMenu.id)!}Form').serializeArray(),
				dataType: "json",
				success: function(data){
					if(data.success) {
						sy.closeWindow();
						$('#admin_menu${(OP.TMenu.id)!}_datagrid').bootstrapTable('refresh');
					}
					sy.toastrsAlert({
		       		     code: data.success ? 'success' :'error',
		       		     msg: data.success ? '成功' :'失败'
		       		});
				}
			});
  		}
		 
	}
  	
  });

//-->
</script>
       <div class="wrapper wrapper-content gray-bg bgg animated  ${(cfg.animated)!}   "   style="height:100%" >
                <div class="ibox">
                    <div class="ibox-content">
                    <form class="form-horizontal m-t required-validate" id="menu${(OP.TMenu.id)!}Form"  action="op_save_${(OP.TMenu.id)!}.${(cfg.suffix)!'action'}"  method="post">
                    <input type="hidden" name="managerid" value="${(dto.managerid)!}"/>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">帐号：</label>
                                <div class="col-sm-8">
                                <#if !dto.managerid??>
                                   <input  name="account" class="form-control" value="${(dto.account)!}" validate="{required:true,messages:{required:'请填写帐号'}}" type="text">
                                <#else>
                                   <span style="display: block;   margin-top: 6px;">${(dto.account)!}</span>
						           <input type="hidden" name="account" class="formText" value="${(dto.account)!}" />
                                </#if>
                                    <!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 这里写点提示的内容</span> -->
                                </div>
                            </div>
                               <#include "../inc.html"/>
                             <div class="form-group">
                                <label class="col-sm-3 control-label">角色：</label>
                                 <div class="col-sm-8">
                                       <select class="form-control m-b" name="TRole.id">
                                        <option value= "">请选择角色</option>
                                        <@my.list id="d" hql="from TRole a">
										<option value="${d.id}"<#if d.id == (dto.TRole.id)!0> selected</#if>>${d.name}</option>
										</@my.list>
                                       </select>
                                </div> 
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">密码：</label>
                                <div class="col-sm-8">
                                    <input  name="password" id="password"  class="form-control" validate="{<#if !dto.managerid??>required: true,</#if>minlength:4,maxlength:20,messages:{<#if !dto.managerid??>required:'请填写密码',</#if>minlength:'密码必须大于等于4',maxlength:'密码必须小于等于20'}}"  type="password"   >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">确认密码：</label>
                                <div class="col-sm-8">
                                    <input   name="rePassword"  class="form-control" type="password"   validate="{<#if !dto.managerid??>required:true,</#if>equalTo:'#password',messages:{<#if !dto.managerid??>required:'请填写重复密码',</#if>equalTo:'两次密码输入不一致'}}" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">姓名：</label>
                                <div class="col-sm-8">
                                    <input name="name" class="form-control" type="text"  value="${(dto.name)!}" validate="{required:true,messages:{required:'请填写姓名'}}"  >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">状态：</label>
                                <div class="col-sm-8">
                                     <div class="radio i-checks    radio-inline">
                                        <label>
                                            <input type="radio" value="true" <#if ((dto.state)!true)==true> checked</#if> name="state"> <i></i> 启动</label>
                                    </div>
                                    <div class="radio i-checks    radio-inline">
                                        <label>
                                            <input type="radio"  <#if ((dto.state)!true)==false> checked</#if>  value="false" name="state"> <i></i>禁用</label>
                                    </div>
                                </div>
                            </div>
                              
                        </form>
                        
                    </div>
                </div>
                </div>
